* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fafafa;
    color: #333;
}

/* 返回导航 */
.back-nav {
    position: fixed;
    top: 1.5rem;
    left: 2rem;
    z-index: 100;
}

.back-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #555;
    font-size: 1.05rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

.back-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2c3e50;
    transition: width 0.3s ease;
}

.back-nav a:hover {
    color: #2c3e50;
}

.back-nav a:hover::after {
    width: 100%;
}

.container {
    max-width: 768px;
    margin: 0 auto;
    padding: 80px 40px;
}

.header {
    margin-bottom: 60px;
}

h1 {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.subtitle {
    font-size: 14px;
    color: #999;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.image-card {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
    aspect-ratio: 1;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
}

.image-card img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.image-card:hover img {
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal img {
    max-width: 90vw;
    max-height: calc(100vh - 120px);
    display: block;
    width: auto;
    height: auto;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .container {
        padding: 40px 20px;
    }

    h1 {
        font-size: 28px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .close-btn {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .back-nav {
        top: 1rem;
        left: 1rem;
    }

    .back-nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}